<% unless session[:user] %>
  <form name="authentication" method="post" action="/auth/login">
      <input type="hidden" name="return" value="<%=url%>" />
             <p><span>Usuário: </span><input id="email" name="email" type="text" /><span> Senha: </span><input id="pass" name="pass" type="password" />  <span class="btsubmit"><%= image_submit_tag "/images/icons/ok.png" %></span><% if flash[:notice] -%> <span class="notice"><script>jQuery(document).ready(function(){alert('<%= flash[:notice] %>')});</script></span><% end -%> <span class="clear">&nbsp;</span></p>
  </form>
<% else %>
  <p class="welcome"><% if session[:user] %>Bem vindo <%= session[:user][:name] %>, <%= link_to 'clique aqui', :controller => 'auth', :action => 'logout', :return => url %> para sair.<% end %></p>
<% end %>
